.PHONY: all clean

all: tp1.pdf
clean:
	rm -f tp1.pdf tp1.log tp1.toc tp1.aux tp1.idx tp1.out

tp1.pdf: main.latex *.sty
	pdflatex -jobname tp1 main.latex
	while grep -qi 'rerun' tp1.log; do pdflatex -jobname tp1 main.latex; done
